<!DOCTYPE html>
<html lang="en">
  <head>
    <title><?php echo $page_title?></title>
	<base href="<?php echo $this->config->base_url(); ?>" />
    <meta charset="utf-8">
    <title></title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

	
	<!--[if IE 7]>
  	<link rel="stylesheet" href="<?php echo site_url()?>/assets/css/font-awesome-ie7.min.css">
	<![endif]-->
    <link href="<?php echo base_url()?>/assets/css/theme-blue.css" rel="stylesheet">
    <link href="<?php echo base_url()?>/assets/css/reset.css" rel="stylesheet">
	 <link href="<?php echo base_url()?>/assets/css/styles.css" rel="stylesheet">
	 <script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js">
    </script>
	   <script type="text/javascript" src="https://www.google.com/jsapi"></script>
	 <link href="<?php echo base_url()?>/assets/css/my.css" rel="stylesheet">
	  <link href="<?php echo base_url()?>/assets/css/text.css" rel="stylesheet">
	<link href="<?php echo base_url()?>/assets/css/styles.css" rel="stylesheet">
	<link href="<?php echo base_url()?>/assets/css/jquery.dataTables_themeroller.css" rel="stylesheet">
	<link href="<?php echo base_url()?>/assets/css/grid.css" rel="stylesheet">
	<link href="<?php echo base_url()?>/assets/css/table.css" rel="stylesheet">	
			<link href="<?php echo base_url()?>/assets/css/styless.css" rel="stylesheet">
	<!--Javascript links-->	
	 <script type="text/javascript" src="<?php echo base_url()?>assets/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>assets/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>assets/js/bootstrap-datepicker.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>assets/js/jquery.dataTables.js"></script>	
	  <script type="text/javascript" src="https://www.google.com/jsapi"></script>
	<script type="text/javascript" src="<?php echo base_url()?>assets/js/custom.js"></script>
  <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>assets/lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>assets/stylesheets/theme.css">
    <link rel="stylesheet" href="<?php echo base_url()?>assets/lib/font-awesome/css/font-awesome.css">
<script>
   function showtime() {
      now=new Date();
      hour=now.getHours();
      min=now.getMinutes();
      sec=now.getSeconds();
    
    if (min<=9) { min="0"+min; }
    if (sec<=9) { sec="0"+sec; }
    if (hour>12) { hour=hour-12; add="pm"; }
    else { hour=hour; add="am"; }
    if (hour==12) { add="pm"; }
    
    time = ((hour<=9) ? "0"+hour : hour) + ":" + min + ":" + sec + " " + add;
    
    if (document.getElementById) { document.getElementById('theTime').innerHTML = time; }
    else if (document.layers) {
     document.layers.theTime.document.write(time);
     document.layers.theTime.document.close(); }
    
    setTimeout("showtime()", 1000);
    }
    window.onload = showtime;
	


</script>
   
    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="../assets/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> 
  <body class=""> 
  <!--<![endif]-->
 <?php if($this->ion_auth->is_admin()) {?>   
 <script>
setInterval("new_diagnosis()",500);
setInterval("new_repair()",500);
function new_diagnosis()
	{
	  $.ajax({type: "POST",url:'<?= site_url('admin/admin_dashboard/get_diagnosis');?>',
	 dataType:'html',success: function(data){ document.getElementById('diag').innerHTML = '+'+data; }})}
function new_repair()
	{
	  $.ajax({type: "POST",url:'<?= site_url('admin/admin_dashboard/get_repair');?>',
	 dataType:'html',success: function(data){ document.getElementById('repair').innerHTML = '+'+data; }})}
</script>
    <div class="navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                    
                   
                      <li id="fat-menu" class="dropdown">
					
                        <a href="#" role="button">
                           <span id="theTime" style="color:white; z-index:2; text-align:centre; font-family: arial; font-size: 10pt"></span>	
                       
                        </a>
						</li>
				   <li id="fat-menu" class="dropdown">
					
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i> <?php echo $this->session->userdata('username')?>
                            <i class="icon-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu">
                            <li><a tabindex="-1" href="<?php echo site_url()?>/admin/admin_dashboard/update_profile">My Profile</a></li>
                            <li class="divider"></li>
                            <li><a tabindex="-1" class="visible-phone" href="#">Settings</a></li>
                            <li class="divider visible-phone"></li>
                            <li><a tabindex="-1"  href="<?php echo site_url()?>/auth/logout" id="logout">Logout</a></li>
							<li><a tabindex="-1"  href="<?php echo site_url()?>/auth/change_password" id="logout">Change Password</a></li>
							
                        </ul>
                    </li>
                    
                </ul>
                <a class="brand" href="<?php echo site_url()?>/admin/admin_dashboard"><span class="first">Lalani </span> <span class="second">Computech</span></a>
        </div>
    </div>
    
 <div class="sidebar-nav">
  <a href="<?php echo site_url()?>/admin/admin_dashboard"class="nav-header" >Dashboard</a>
       
        <a href="#dashboard-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>Service ID</a>
        <ul id="dashboard-menu" class="nav nav-list collapse">
           <li><a href="<?php echo site_url()?>/admin/list_view"><i class="icon-eye-open" ></i>View All </a></li>
           <li><a href="<?php echo site_url()?>/admin"><i class="icon-plus" ></i>Create New </a></li>	
            <li><a href="<?php echo site_url('/admin/expenses/assigned_engineer')?>"><i class="icon-certificate" ></i>Change Assigned Engineer </a></li> 
			 <li><a href="<?php echo site_url('/admin/expenses/deliver_customer')?>"><i class="icon-certificate" ></i>Deliver Customer </a></li>
        </ul>

        <a href="#bluestar-menu" class="nav-header" data-toggle="collapse"><i class="icon-briefcase"></i>Diagnosis<span id="diag" class="label label-info"></span></a>
        <ul id="bluestar-menu" class="nav nav-list collapse">
          <li><a href="<?php echo site_url('/admin/diagnosis/all_diagnosis')?>">View ALL Diagnosis</a></li>
                 <li><a href="<?php echo site_url('/admin/diagnosis/dispatch_diagnosis')?>">Completed Diagnosis</a></li>
        </ul>

        <a href="#scan-source" class="nav-header collapsed" data-toggle="collapse"><i class="icon-exclamation-sign"></i>Docket<i class="icon-chevron-up"></i></a>
        <ul id="scan-source" class="nav nav-list collapse">
          <li><a href="<?php echo site_url('/admin/docket/new_received')?>">Received New Dispatch</a></li>
                 <li><a href="<?php echo site_url('/admin/docket/view_all')?>">ALL Docket</a></li>	
				 <li><a href="<?php echo site_url('/admin/docket/view_notassigned')?>">Docket Not Assigned </a></li>	
				 
        </ul>

        
		<a href="#repair_all" class="nav-header" data-toggle="collapse"><i class="icon-legal"></i>Repair<span id="repair" class="label label-info"></span></a>
        <ul id="repair_all" class="nav nav-list collapse">
           <li><a href="<?php echo site_url('/admin/repair/view_allrepair')?>">View all Repair</a></li>
           <li><a href="<?php echo site_url('/admin/repair/view_completed_repair')?>">View all Completed Repair</a></li>
           <li><a href="<?php echo site_url('/admin/repair/view_pending_repair')?>">View all Pending Repair</a></li>		
        </ul>
        <a href="#defective" class="nav-header" data-toggle="collapse"><i class="icon-th"></i>Defective part</a>
        <ul id="defective" class="nav nav-list collapse">
            <li><a href="<?php echo site_url('/admin/defective/view_alldefective')?>">View all Defective</a></li>
                  <li><a href="<?php echo site_url('/admin/defective/new_docket')?>"> Redispatch Received</a></li>	
				<li><a href="<?php echo site_url('/admin/defective/all_redispatch')?>">All Redispatch</a></li>  
				<li><a href="<?php echo site_url('/admin/defective/all_notassigned')?>"> Redispatch Not Assigned</a></li>  
		  		</ul>
        </ul>
		<a href="#re-assign" class="nav-header" data-toggle="collapse"><i class="icon-fire"></i>Re-Converted Case</a>
        <ul id="re-assign" class="nav nav-list collapse">
           <li><a href="<?php echo site_url('/admin/repair/view_reassigned')?>">View all </a></li>
               <li><a href="<?php echo site_url('/admin/reassigned_case/view_reassigned')?>"> Re-assigned </a></li>
             <li><a href="<?php echo site_url('/admin/reassigned_case/view_notreassigned')?>">Not Assign </a></li>	
        </ul>
		<a href="#part-order" class="nav-header" data-toggle="collapse"><i class="icon-tasks"></i>Part Order</a>
        <ul id="part-order" class="nav nav-list collapse">
           <li><a href="<?php echo site_url('admin/order/view_order')?>"><i class="icon-eye-open" ></i> View all Placed Order</a></li>
					  <li><a href="<?php echo site_url('admin/order/order_received')?>"><i class="icon-eye-open" ></i> New Received Order</a></li>
					  <li><a href="<?php echo site_url('admin/order/all_order')?>"><i class="icon-eye-open" ></i> ALL Received Order</a></li>
					  <li><a href="<?php echo site_url('admin/order/order_notassigned')?>"><i class="icon-eye-open" ></i> Order Not Assigned</a></li>
        </ul>
		<a href="#chk_status" class="nav-header" data-toggle="collapse"><i class="icon-tasks"></i>Check Case Status</a>
        <ul id="chk_status" class="nav nav-list collapse">
           <li><a href="<?php echo site_url('admin/chk_status/chk_case')?>"><i class="icon-certificate" ></i> Check Case Status</a></li>
					  
        </ul>
		<a href="#chk_expenses" class="nav-header" data-toggle="collapse"><i class="icon-tasks"></i>Expenses</a>
        <ul id="chk_expenses" class="nav nav-list collapse">
           <li><a href="<?php echo site_url('/admin/expenses/all_expenses')?>"><i class="icon-certificate" ></i> Engineer Expenses </a></li>			  
        </ul>
		<a href="#chk_report" class="nav-header" data-toggle="collapse"><i class="icon-tasks"></i>Report</a>
        <ul id="chk_report" class="nav nav-list collapse">
           <li><a href="<?php echo site_url('/admin/expenses/Report')?>"><i class="icon-certificate" ></i> Report </a></li>
		   <li><a href="<?php echo site_url('/admin/expenses/all_worksheet')?>"><i class="icon-certificate" ></i>Engineer Worksheet</a></li>
					  
        </ul>
		<a href="#order" class="nav-header" data-toggle="collapse"><i class="icon-tasks"></i>Repair Assigned</a>
        <ul id="order" class="nav nav-list collapse">
         <li><a href="<?php echo site_url('/admin/repair/view_assigned_repair')?>">New Assigned Repair</a></li>
           <li><a href="<?php echo site_url('/admin/repair/ongoing_repair_view')?>">ON-Going Repair</a></li>
           <li><a href="<?php echo site_url('/admin/repair/completed_repair')?>">Completed Repair</a></li>	 
        </ul>
		<a href="#assigned_diag" class="nav-header" data-toggle="collapse"><i class="icon-tasks"></i>Diagnosis Assigned</a>
        <ul id="assigned_diag" class="nav nav-list collapse">
         <li><a href="<?php echo site_url('/admin/diagnosis/view_assigned_diagnosis')?>">New Assigned Diagnosis</a></li>
           <li><a href="<?php echo site_url('/admin/diagnosis/ongoing_diagnosis_view')?>">ON-Going Diagnosis</a></li>
           <li><a href="<?php echo site_url('/admin/diagnosis/completed_diagnosis_view')?>">Completed Diagnosis</a></li>	 
        </ul>
        <a href="#other" class="nav-header" data-toggle="collapse"><i class="icon-globe"></i>Other</a>
        <ul id="other" class="nav nav-list collapse">
           <li><a href="<?php echo site_url('/admin/engineer/create_engineer')?>"><i class="icon-plus" ></i> Add Engineer </a></li>	
		  		<li><a href="<?php echo site_url('admin/engineer/view_engineer')?>"><i class="icon-eye-open" ></i> View Engineer</a></li>
 				 <li><a href="<?php echo site_url('/admin/diagnosis/create_supplier')?>"><i class="icon-plus" ></i> Add Supplier </a></li>
				  <li><a href="<?php echo site_url('admin/diagnosis/view_supplier')?>"><i class="icon-eye-open" ></i> View Supplier</a></li>
				   <li><a href="<?php echo site_url('admin/admin_dashboard/update_company')?>"><i class="icon-eye-open" ></i>Update Company Profile</a></li>
				     
        </ul>
    </div>
	<div class="content">
<?php } else {?>
 <script>
setInterval("new_diagnosis_eng()",1000);
setInterval("new_repair_eng()",1000);
function new_diagnosis_eng()
	{
	  $.ajax({type: "POST",url:'<?= site_url('engineer/engineerDashboard/get_diagnosis');?>',
	 dataType:'html',success: function(data){ document.getElementById('diagn').innerHTML = '+'+data; }})}
function new_repair_eng()
	{
	  $.ajax({type: "POST",url:'<?= site_url('engineer/engineerDashboard/get_repair');?>',
	 dataType:'html',success: function(data){ document.getElementById('repairn').innerHTML = '+'+data; }})}
</script>
<div class="navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                    
                
					<li id="fat-menu" class="dropdown">
                        <a href="#" role="button">
                           <span id="theTime" style="color:white; z-index:2; text-align:centre; font-family: arial; font-size: 10pt"></span>	
                        </a>
                    <li id="fat-menu" class="dropdown">
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i>  <?php echo $this->session->userdata('username')?>
                            <i class="icon-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu">
                            <li><a tabindex="-1"  href="<?php echo site_url()?>/engineer/engineerDashboard/update_profile">My Profile</a></li>
                            <li class="divider"></li>
                            <li><a tabindex="-1" class="visible-phone" href="#">Settings</a></li>
                            <li class="divider visible-phone"></li>
                            <li><a href="<?php echo site_url()?>/auth/logout" id="logout">Logout</a></li> 
							 <li><a href="<?php echo site_url()?>/auth/change_password" id="logout">Change Password</a></li>
                        </ul>
                    </li>
                    
                </ul>
                <a class="brand" href="<?php echo site_url()?>/engineer/engineerDashboard"><span class="first">Lalani </span> <span class="second">Computech</span></a>
        </div>
    </div>
    
 <div class="sidebar-nav">
 <a href="<?php echo site_url()?>/engineer/engineerDashboard"class="nav-header" >Dashboard</a>
        <a href="#diagnosis-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>Diagnosis <span id="diagn"class="label label-info"></span></a>
        <ul id="diagnosis-menu" class="nav nav-list collapse ">
            <li><a href="<?php echo site_url()?>/engineer/diagnosis/new_assigned"><i class="icon-eye-open" ></i>New Assigned Diagnosis</a></li>
                <li><a href="<?php echo site_url()?>/engineer/diagnosis/ongoing_process"><i class="icon-plus" ></i>Ongoing  Diagnosis </a></li>	
				<li><a href="<?php echo site_url()?>/engineer/diagnosis/dispatch_view"><i class="icon-eye-open" ></i>Completed  Diagnosis </a></li>
        </ul>

        <a href="#repair-menu" class="nav-header" data-toggle="collapse"><i class="icon-briefcase"></i>Repair<span id="repairn"class="label label-info"></span></a>
        <ul id="repair-menu" class="nav nav-list collapse">
          <li><a href="<?php echo site_url()?>/engineer/repair/new_repair"><i class="icon-eye-open" ></i>New Assigned Repair </a></li>
                <li><a href="<?php echo site_url()?>/engineer/repair/ongoing_process"><i class="icon-plus" ></i>Ongoing Repair Case </a></li>	
				<li><a href="<?php echo site_url()?>/engineer/repair/completed_repair"><i class="icon-eye-open" ></i>Completed Repair </a></li>
        </ul>

       
    </div>
	
	<div class="content">
	<?php } ?>